# GUI部分代码

# 项目头文件
include_directories(../time)
include_directories(../core)

# 动态库链接目录
if(LINUX)
    set(CMAKE_INSTALL_RPATH "$ORIGIN/")
    # libtime与libgui位于同一安装目录
endif()

# 编译动态库
add_library(gui SHARED chronograph.cpp
    countdown.h countdown.cpp
    mainwindow.h mainwindow.cpp
    ../core/config.cpp
)

# 设置输出路径
set(LIBRARY_OUTPUT_PATH ${RELEASE_DIR}/lib/${CMAKE_PROJECT_NAME})

# 连接Qt6库
target_link_libraries(gui PRIVATE Qt6::Core Qt6::Gui Qt6::Widgets time)
